/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.ui;

import java.awt.Color;
import java.io.FileNotFoundException;
import java.io.IOException;
import nominalitzacions.domain.SettingsDomainController;

/**
 *
 * @author genis
 */
public class SettingsViewController {
    private SettingsView SV;
    private SettingsDomainController SDC;

    public SettingsViewController() throws IOException {
        SDC = new SettingsDomainController();
        SV = new SettingsView(this);
    }

    public void setVisible() throws FileNotFoundException {
        SV.setVisible(true);
    }

    public void setEnable(boolean b) {
        this.setEnable(b);
    }

    public void setChecks(boolean [] b) {
        SDC.setChecks(b);
    }

    public boolean [] getChecks() {
        return SDC.getChecks();
    }

    public void setK(String k) {
        SDC.setK(Integer.parseInt(k));
        System.out.println("K al guardar 2" + Integer.parseInt(k));
    }

    public String getK() {
        return String.valueOf(SDC.getK());
    }

    public void setN(String n) {
        SDC.setN(Integer.parseInt(n));
        System.out.println("N al guardar 2" + Integer.parseInt(n));
    }

    public String getN() {
        return String.valueOf(SDC.getN());
    }

    public void setBg(Color bc) {
        SDC.setBackground(bc);
    }

    public Color getBg() {
        return SDC.getBackground();
    }

    public void setHl(Color hc) {
        SDC.setHighlight(hc);
    }

    public Color getHl() {
        return SDC.getHighlight();
    }

    public void saveSettings() throws IOException {
        SDC.saveSettings();
    }
}
